package com.qinhailin.portal.demo.ctr;

import com.alibaba.fastjson.JSONObject;
import com.jfinal.render.Render;
import com.qinhailin.common.base.BaseController;
import com.qinhailin.common.routes.ControllerBind;

/**
 * @author:jzz
 * @date:2020/8/9
 */
@ControllerBind(path = "/portal/demo", viewPath = "/portal/demo")
public class DemoController extends BaseController {


    public void index () {
        renderText("hello world");
    }

    public void detail () {
        JSONObject json = new JSONObject();
        json.put("name","大哥大");
        json.put("msg","无法拥有");

        set("json",json);
        render("hello.html");
//      render("/hello.html");  加 / 是根路径   在 webapp
    }



}
